<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<th:block th:include="include::header('用户添加')"/>
</head>
<body>
<div class="panel-group">
	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a href="#dqpb" data-toggle="collapse" data-parent="#accordion">1.获取国际化信息</a></h4>
		</div>
		<div id="dqpb" class="panel-collapse collapse">
			<div class="panel-body" th:with="num=5">
				<p class="text-left">获取 th:with 定义的值: [[(${num})]]</p>
				<p class="text-left">1. 普通索引方式: [[#{user.password.not.match}]]</p>
				<p class="text-left">2. 传入索引方式: [[#{user.password.retry.limit.exceed(${num})}]]</p>
			</div>
		</div>
	</div>
	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a href="#dqpb1" data-toggle="collapse" data-parent="#accordion">2.获取变量方式</a></h4>
		</div>
		<div id="dqpb1" class="panel-collapse collapse">
			<div class="panel-body">
				<p class="text-left">1.获取对象的name属性: [[${user1.name}]]</p>
				<p class="text-left">2.获取集合的元素: [[${users[0].name}]]</p>
				<p class="text-left">3.获取Map的元素: [[${userMap['user1'].name}]]</p>
				<p class="text-left">3.获取数组的元素: [[${userArray[0].name}]]</p>
			</div>
		</div>
	</div>
	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a href="#dqpb2" data-toggle="collapse" data-parent="#accordion">3. 处理转义文本</a></h4>
		</div>
		<div id="dqpb2" class="panel-collapse collapse">
			<div class="panel-body" th:with="html='<h3>Luna测试</h3>'">
				1. 转义字符输出
				<p class="text-left" th:text="${html}"></p>
				2. 无转义字符输出
				<p class="text-left" th:utext="${html}"></p>
			</div>
		</div>
	</div>
	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a href="#dqpb3" data-toggle="collapse" data-parent="#accordion">4. 链接表达式</a></h4>
		</div>
		<div id="dqpb3" class="panel-collapse collapse">
			<div class="panel-body" th:with="html='<h3>Luna测试</h3>'">
				<p class="text-left">
					<button><a th:href="@{/getUser(userId=${user1.getId()})}">设置单个参数url</a></button>
				</p>
				<p class="text-left">
					<button><a th:href="@{/getIdAndName(userId=${user1.id},name=${user1.name})}">设置多个参数url</a></button>
				</p>
				<p class="text-left">
					<button><a th:href="@{/users}">rest风格url </a></button>
				</p>
			</div>
		</div>
	</div>
	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a href="#dqpb4" data-toggle="collapse" data-parent="#accordion">5. 数字对象</a></h4>
		</div>
		<div id="dqpb4" class="panel-collapse collapse">
			<div class="panel-body" th:with="num = 1000">
				<p class="text-left">Thymeleaf 主要使用org.Thymeleaf.expression.Numbers 这个类来处理数字 在模板中使用" #numbers
					"来表示这个对象</p>
				一1.数字格式化 th:with="num = 1000"<p th:utext="'[[${#numbers.formatInteger(num,5)}]]'"></p>
				<p class="text-left">[[${#numbers.formatInteger(num,5)}]]</p>
				2.数组 <p th:utext="'${#numbers.arrayFormatInteger(arr,5)}'"></p>
				<p class="text-left" th:each="arrNum : ${#numbers.arrayFormatInteger(arr,5)}">[[${arrNum}]]</p>
				3.List <p th:utext="'[[${#numbers.listFormatInteger(list,5)}]]'"></p>
				<p class="text-left">[[${#numbers.listFormatInteger(list,5)}]]</p>
				4.Set <p th:utext="'[[${#numbers.setFormatInteger(set,5)}]]'"></p>
				<p class="text-left">[[${#numbers.setFormatInteger(set,5)}]]</p>

				二1.小数格式化 三位整数,两位小数<p th:utext="'[[${#numbers.formatDecimal(10.992, 3, 2)}]]'"></p>
				<p class="text-left">[[${#numbers.formatDecimal(10.992, 3, 2)}]]</p>
				2.数组 10.992 & 1299.22 <p th:utext="'${#numbers.listFormatDecimal(decimal,3,2)}'"></p>
				<p class="text-left" th:each="arrDec : ${#numbers.listFormatDecimal(decimal,3,2)}">[[${arrDec}]]</p>
				3.List <p th:utext="'[[${#numbers.listFormatDecimal(listDec, 2, 3)}]]'"></p>
				<p class="text-left">[[${#numbers.listFormatDecimal(listDec, 2, 3)}]]</p>
				4.Set <p th:utext="'[[${#numbers.setFormatDecimal(setDec, 3, 2)}]]'"></p>
				<p class="text-left">[[${#numbers.setFormatDecimal(setDec, 3, 2)}]]</p>
			</div>
		</div>
	</div>
	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a href="#dqpb5" data-toggle="collapse" data-parent="#accordion">6. 分隔符</a></h4>
		</div>
		<div id="dqpb5" class="panel-collapse collapse">
			<div class="panel-body" th:with="num = 1000">
				三1.标识千分位分隔符 th:with="num = 1000" <p
					th:text="'[[${#numbers.formatInteger(num,5,'+'\'POINT\''+')}]]'"></p>
				<p class="text-left">POINT使用"."作为分隔符:[[${#numbers.formatInteger(num,5,'POINT')}]]</p>
				2.标识千分位分隔符 th:with="num = 1000" <p th:text="'[[${#numbers.formatInteger(num,5,'+'\'COMMA\''+')}]]'"></p>
				<p class="text-left">COMMA使用","作为分隔符:[[${#numbers.formatInteger(num,5,'COMMA')}]]</p>
				3.标识千分位分隔符 th:with="num = 1000" <p
					th:text="'[[${#numbers.formatInteger(num,5,'+'\'WITHSPACE\''+')}]]'"></p>
				<p class="text-left">WHITESPACE使用" "作为分隔符:[[${#numbers.formatInteger(num,5,'WHITESPACE')}]]</p>
				<p class="text-left"></p>
			</div>
		</div>
	</div>
	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a href="#dqpb6" data-toggle="collapse" data-parent="#accordion">7. 货币格式化</a></h4>
		</div>
		<div id="dqpb6" class="panel-collapse collapse">
			<div class="panel-body">
				1. 显示美元符号 ￥ <p th:text="'[[${#numbers.formatCurrency(10.99)}]]'"></p>
				<p class="text-left">[[${#numbers.formatCurrency(10.99)}]]</p>
				2. 数组=>>arrayFormatCurrency, List=>>listFormatCurrency, Set=>>setFormatCurrency 如上
			</div>
		</div>
	</div>
	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a href="#dqpb7" data-toggle="collapse" data-parent="#accordion">8. 百分比格式化</a></h4>
		</div>
		<div id="dqpb7" class="panel-collapse collapse">
			<div class="panel-body">
				1.添加百分号 % 小数点后保留三位 前两位 <p th:text="'[[${#numbers.formatPercent(0.23456, 2, 3)}]]'"></p>
				<p class="text-left">[[${#numbers.formatPercent(0.23456, 2, 3)}]]</p>
			</div>
		</div>
	</div>

	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a th:href="@{/commonSyntax}" >9. 语法表达式</a></h4>
		</div>
	</div>

	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a th:href="@{/crud/users}" >10. crud操作</a></h4>
		</div>
	</div>

	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a th:href="@{/fragment}" >11. 模板操作</a></h4>
		</div>
	</div>

	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a th:href="@{/inlining}" >12. 内联语法</a></h4>
		</div>
	</div>

	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a th:href="@{/management}">13. html调用后台</a></h4>
		</div>
	</div>

	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a th:href="@{/baiduMap}">14. 百度地图</a></h4>
		</div>
	</div>

	<div class="panel-default panel">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a th:href="@{/alipay}">15. 支付宝接口</a></h4>
		</div>
	</div>

</div>



<!-- 全局js -->
<th:block th:include="include :: footer"/>
</body>
</html>